package demo2;
import java.util.Arrays;
import java.util.Scanner;
public class WorkTime {
    public static int function(int[] data, int key) {
        Arrays.sort(data);
        int left = 0;
        int right = data.length-1;
        while(left<=right) {
            int mid = left+(right-left)/2;
            if(data[mid]<key) {
                left = mid+1;
            } else if(data[mid]>key) {
                right = mid-1;
            } else {
                return mid;
            }
        }
        return -1;
    }

    public static void main(String[] args) {
        int[] data = new int[200];
        for(int i = 0; i < 200; i++) {
            data[i] = i*4+6;
        }
        Scanner scanner = new Scanner(System.in);
        int key = scanner.nextInt();
        System.out.println(function(data, key));
    }
}

// 1:无需package
// 2: 类名必须Main, 不可修改

class Main {
    public static void main(String[] args) {
        int[] data = new int[200];
        for(int i = 0; i < 200; i++) {
            data[i] = i*4+6;
        }
        Scanner scanner = new Scanner(System.in);
        int key = scanner.nextInt();
        Arrays.sort(data);
        int left = 0;
        int right = data.length-1;
        while(left<=right) {
            int mid = left+(right-left)/2;
            if(data[mid]<key) {
                left = mid+1;
            } else if(data[mid]>key) {
                right = mid-1;
            } else {
                System.out.println(mid);
            }
        }
        scanner.close();
    }
}